﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HCM_maps_website.Models
{
    public class ListNodeInfo
    {
        private List<NodeInfo_old> nodeInfoList;

        public List<NodeInfo_old> NodeInfoList
        {
            get { return nodeInfoList; }
            set { nodeInfoList = value; }
        }
        public int getSize()
        {
            return nodeInfoList.Count;
        }
        public ListNodeInfo()
        {
            nodeInfoList = new List<NodeInfo_old>();
                
        }

        public void addNode(NodeInfo_old node)
        {
            nodeInfoList.Add(node);
        }

        public NodeInfo_old getNodeInfoByIndex(int index)
        {
            return nodeInfoList[index];
        }

        public NodeInfo_old getNodeInfo(int Id)
        {
            foreach (var item in nodeInfoList)
            {
                if (Id == item.Id)
                {
                    return item;
                }
            }
            return null;
        }

        public NodeInfo getNodeInfo(Coordinate coor)
        {
            return null;
        }
    }
}
